Restore Backup
This API restores data from a backup using the selected scopes. The backup can be restored from an existing backup or from an uploaded backup file, and the API returns the restore ID used to track the process.
Endpoint Details
| URL | /v1/restore |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"restore_method": 1,
"backup_id": "f5316dfe-52a1-4289-8d13-9fdc81d3e11b",
"upload_id": "",
"uploaded_file_name": "",
"encryption_key": "jMYha+X9sGxKDOkcwJQu43H2CaGuQJYSTyvJXtBN6Q8=",
"scopes_to_restore": [
1,
2
],
"delete_existing": false
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| restore_method | Integer | Method used to perform the restore |
| backup_id | UUID | Identifier of the existing backup to restore from |
| upload_id | String | Identifier of the uploaded backup file, used when restoring from an upload |
| uploaded_file_name | String | Name of the uploaded backup file, used when restoring from an upload |
| encryption_key | String | Encryption key used to decrypt the backup file |
| scopes_to_restore | Array | List of scope codes to restore from the backup |
| delete_existing | Boolean | Indicates whether existing data is removed before the restore runs |
Response
Here is an example response after the request has been successfully processed:
Response
{
"restore_id": "e0f92810-1f2b-4c58-8088-690296e1c504"
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| restore_id | UUID | Unique identifier of the restore process |
info
- A valid Bearer Token is required to access this endpoint.
- The
restore_methoddetermines the source of the backup to restore from:1= Backup ID — restore from an existing backup. Provide thebackup_id.2= Upload file — restore from an uploaded backup file. Provide theupload_idanduploaded_file_name.
- The
scopes_to_restorearray uses the following codes:1= System Configuration2= Keys3= Audit Log4= System Log
- The
encryption_keymust match the key generated when the backup was created. Without it, the backup file cannot be restore. - When
delete_existingis set totrue, existing data within the selected scopes is removed before the restore runs.